package com.example.lombok;

import lombok.EqualsAndHashCode;

/**
 * @author shanchong
 * @date 2019-06-23
 **/
@EqualsAndHashCode
public class EqualsAndHashCodeDemo {

    /**
     * @EqualsAndHashCode：用在类上，自动生成equals方法和hashCode方法
     * @param args
     */
    public static void main(String[] args) {
        EqualsAndHashCodeDemo equalsAndHashCodeDemo = new EqualsAndHashCodeDemo();
        System.out.println(equalsAndHashCodeDemo.hashCode());
        System.out.println(equalsAndHashCodeDemo.equals(equalsAndHashCodeDemo));
        System.out.println(equalsAndHashCodeDemo.canEqual(equalsAndHashCodeDemo));
    }

}
